-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【Export Add No.35】nowcastnet #790
Conversation
Thanks for your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 标题需以【PPSCI Export&Infer No.】开头
- 补一下报名信息
- 补充 Inference 函数
@@ -55,3 +56,6 @@ MODEL: | |||
# evaluation settings | |||
EVAL: | |||
pretrained_model_path: checkpoints/paddle_mrms_model | |||
|
|||
INFER: | |||
pretrained_model_path: checkpoints/paddle_mrms_model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
INFER的预训练模型路径默认值和EVAL不同,需要填写官方提供的预训练模型,避免用户再手动下载再通过参数指定。改为:https://paddle-org.bj.bcebos.com/paddlescience/models/nowcastnet/nowcastnet_pretrained.pdparams
@hydra.main(version_base=None, config_path="./conf", config_name="nowcastnet.yaml") | ||
def main(cfg: DictConfig): | ||
if cfg.mode == "train": | ||
train(cfg) | ||
elif cfg.mode == "eval": | ||
evaluate(cfg) | ||
elif cfg.mode == "export": | ||
export(cfg) | ||
else: | ||
raise ValueError(f"cfg.mode should in ['train', 'eval'], but got '{cfg.mode}'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error信息里加上export
input_spec = [ | ||
{key: InputSpec([None, 1], "float32", name=key) for key in model.input_keys}, | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该模型的形状不是[None, 1]
,应该是[None, 29, 512, 512, 2]
@Liyulingyue 张师傅,别忘了这个PR哈 |
Closed for PR #895 is merged |
PR types
Others
PR changes
Others
Describe
#788